package com.dxy.df.modules.service.impl;

import com.dxy.df.constants.ConstStrings;
import com.dxy.df.modules.bean.entity.UserAccountEntity;
import com.dxy.df.utils.UcBeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.dxy.df.modules.bean.vo.UserAccountVo;
import com.dxy.df.modules.bean.query.UserAccountQuery;
import com.dxy.df.modules.bean.put.UserAccountPut;
import com.dxy.df.modules.dao.UserAccountMapper;
import com.dxy.df.modules.service.UserAccountService;


/**
 * @author biz@dxy.cn
 * @describe 用户账号表
 * @date 2019-10-25 17:27:09
 */
@Service
public class UserAccountServiceImpl implements UserAccountService {
	@Autowired
	private UserAccountMapper userAccountMapper;
	
	@Override
	public UserAccountEntity queryObject(UserAccountQuery query){
		return userAccountMapper.queryObject(query);
	}
	
	@Override
	public List<UserAccountVo> queryList(UserAccountQuery query){
		return userAccountMapper.queryList(query);
	}
	
	@Override
	public int queryTotal(UserAccountQuery query){
		return userAccountMapper.queryTotal(query);
	}
	
	@Override
	public void save(UserAccountPut put){
		UserAccountEntity entity = UcBeanUtils.copyPropertiesForDDL(put, UserAccountEntity.class, ConstStrings.ADD);
		userAccountMapper.save(entity);
	}
	
	@Override
	public void update(UserAccountPut put){
		UserAccountEntity entity = UcBeanUtils.copyPropertiesForDDL(put, UserAccountEntity.class, "");
		userAccountMapper.update(entity);
	}
	
	@Override
	public void delete(Integer id){
		userAccountMapper.delete(id);
	}

	@Override
    public int deleteBatch(Integer[] ids){
		return userAccountMapper.deleteBatch(ids);
	}

}
